<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客详情页面</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/详情页面专用CSS.css">

    <link rel="stylesheet" href="editor.md-master/css/editormd.min.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="editor.md-master/lib/marked.min.js"></script>
    <script src="editor.md-master/lib/prettify.min.js"></script>
    <script src="editor.md-master/editormd.js"></script>
</head>
<body>
    <!-- 导航栏 -->
    <div class="nav">
        <img src="image/狗狗.png" alt="">
        <sapn class="title">我的博客系统</sapn>
        <span class="spacer"></span>
        <a href="blog_list">主页</a>
        <a href="blog_edit.html">写博客</a>
        <a th:if="${showDeleteButton}" th:href="${'blog_delete?blogId='+blog.blogId}">删除</a>
        <a href="logout">注销</a>
    </div>
    <!-- 版心 -->
    <div class="container">
        <!-- 左侧区域，显示用户信息 -->
        <div class="container-left">
            <!-- 用户详情 -->
            <div class="card">
                <!-- 头像 -->
                <img src="image/头像.png" alt="">
                <!-- 用户名字 -->
                <h3 th:text="${user.username}"></h3>
                <!-- gitee地址链接 -->
                <a href="https://gitee.com/Coach_zhang">博主的gitee链接</a>
                <!-- 显示文章分类的数目 -->
                <div class="counter">
                    <span>文章</span>
                    <span>分类</span>
                </div>
                <div class="counter">
                    <span>2</span>
                    <span>1</span>
                </div>
            </div>
        </div>
        <!-- 右侧区域，博客详情 -->
        <div class="container-right">
            <div class="blog-content">
                <h3 th:text="${blog.title}"></h3>
                <div class="date" th:text="${blog.postTime}"></div>
                <div th:text="${blog.content}" id="content" style="background-color:transparent;">
                    
                </div>
            </div>
        </div>
    </div>
    <script>
        let markdown=document.querySelector('#content').innerHTML;
        document.querySelector('#content').innerHTML='';
        editormd.markdownToHTML('content',{markdown: markdown});
    </script>
</body>
</html>